<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php
   /* $filename = 'style.css';
    $path= 'components/com_pvp/lib/';
	JHTML::stylesheet($filename, $path); 		

    $filename = 'demo_table_jui.css';
    $path= 'components/com_pvp/lib/dataTables/css/';
	JHTML::stylesheet($filename, $path); 		
    
	$filename = 'demo_page.css';
	JHTML::stylesheet($filename, $path); 		
	
	$filename = 'demo_table.css';
	JHTML::stylesheet($filename, $path); 		
	
    $filename = 'jquery-ui-1.8.4.custom.css';
    $path= 'components/com_pvp/lib/dataTables/smoothness/';
	JHTML::stylesheet($filename, $path); 		
	
	$document = &JFactory::getDocument();
	$document->addScript( 'components/com_pvp/lib/jquery/jquery-1.5.1.min.js' );
	$document->addScript( 'components/com_pvp/lib/dataTables/js/jquery.datatables.js' ); */
?>

<form action="index.php" method="post" name="CourseType">
	<table>
	<thead>
		<tr>
			<th>Course name</th>
			<th>Author</th>
		</tr>
	</thead>
	<?php
	$k = 0;
	for ($i=0, $n=count( $this->items ); $i < $n; $i++)	{
		$row = &$this->items[$i];
		$link = JRoute::_( 'index.php?option=com_reportmanager&controller=coursetype&task=edit&cid[]='. $row->id ); ?>
		<tr onclick="document.location.replace('<?php echo $link ?>')">
			<td>
				<?php echo $row->name; ?>
			</td>
			<td>
				<?php echo $row->user_name; ?>
			</td>
		</tr>
		<?php
		$k = 1 - $k;
	}
	?>
	</table>

<input type="hidden" name="option" value="com_reportmanager" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="controller" value="coursetype" />
</form>
